package org.csu.mypetstore.domain;

import java.io.FileWriter;
import java.io.IOException;

/* *
 *������AlipayConfig
 *���ܣ�����������
 *��ϸ�������ʻ��й���Ϣ������·��
 *�޸����ڣ�2017-04-05
 *˵����
 *���´���ֻ��Ϊ�˷����̻����Զ��ṩ���������룬�̻����Ը����Լ���վ����Ҫ�����ռ����ĵ���д,����һ��Ҫʹ�øô��롣
 *�ô������ѧϰ���о�֧�����ӿ�ʹ�ã�ֻ���ṩһ���ο���
 */

public class AlipayConfig {
	
//�����������������������������������Ļ�����Ϣ������������������������������

	// Ӧ��ID,����APPID���տ��˺ż�������APPID��Ӧ֧�����˺�
	public static String app_id = "2021000119688424";
	
	// �̻�˽Կ������PKCS8��ʽRSA2˽Կ
    public static String merchant_private_key = "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDwmTq5aPuwXNceIeIIUtqLpzznD5gThmpEwG6omFasgGhmrHY/5vPvDtTSNGlMjDwGKYZ5uF8L7ONs4EoUO3H3c5k2BrUg+PjlS/Q8fqiB+rVvYVGlmT5hbuBRAzK6q3oKqQgkgXfs4+dsaznv1Z9eICNARY3FkBWpp9Qvc9yT6ky0BCVMgvIGJae9y3QM1EWKTj44xAd/d8F8bvq4Bd5cT585kImKIf3JZzkx5ZDNcUeHPemrsKo8jxXe0Z4o44x/fdH4JuqkHy+gvknHOfz20GTOKAqb6niYRQXejjO4khD7v+O1urz8l/3LGVbhyQrycWRbhOlwDJ2kun0uxgkNAgMBAAECggEAOR+oWa0bVNw2FulkiSVizhV+2D1Tlg8r2/b0TwMcUQiLwRThXnqvH+sdjGr1NT92YOArFWs45dPwi0EVVYhnnqDLl5AwIQv7zDUkX9iSmYm02iT5BaBEt01j5Nglizx7VVycmk5C8vOJVqx+rPrDQ83NkMzyxB1Zh1ZZgoq3rEZW4oEkV7VzUdAWyDUyMWyB8x41APTG4eiPM+ceROuTmJbkQI6GoLnPBAu16/IRsHAj1/T/uRJ08QOOhIguhrypVW29IIZ1rXPT6qDdMMsr++L47cw4C+x67oAkCtbFQm0gUfMRliBHrRuw9vE54Bsd9Ke+Rs6WAgptELe1XR0kAQKBgQD8NU6iF1xmBOcSGicsgIL5vFMwNYgALbKRu2P6h8BdMwnn2u5iDk9kYkDronZvFhPAtsdZtSceT4s3iqaaiX3aG28O7trbx2VLSXMtbd/CcPzI/Eow1dJOorRH00nqXgPdweFLiGQF13hsnkn29AlO1HhyqwCVb4kTA/V6KzuuYQKBgQD0Nz07Mp7MHZ5DG+Bj3ngzMqrDywDvH4AzGk8DJjzw1nFVld4vqAolnO/pZ0pRMI6M3gGOz2kRuc6R/Oz4lZretlXLW15h+zyzAlH1OxLxnvusZCSQ2q8mfPOL+sSdLPnR18HX3H5eefZm4cA5mwJ/cbhm/INT3C4A5vnSoU+iLQKBgQDtfQTefUD0kAlGcnoQ3bJ3l25+Juo5wM41jE9IyivJlxXszatLik4YKK0ZNZJwaEmRXou5XWvIjv54/oaDXpSznMGnPiO4cLpheniKfrwFTH+8glUaRz4R7gP03nDr0Duzxa1wgq4tEgjDvwnHEWTyZgBFeeDC1pQs471znOJGAQKBgQCaholb97+679LAK9dj2dS8sIaUtNK2e3wm2bK9D2joCwhTWyzngrBI9HBpg03m6Y6JW8AomNymtqcagKuA70i7Oyw2LG4gGVRjAEjTnrlx4WLlxcfNUFIbTFzeaaIWweqg+KBS8dWT+iALITT8PjTqZw6DO6vtWBhTwdK5kBBPUQKBgQDSPgrTs799wOQpXg1DMHkO2L6B+f4V4d8SfUfgvFujHKLR6AXPVbp596ak/aJdwBPm6BcEdtGEN6n+gUFwjB+42Lc4/1ZaBtx6yqnGLtLwTiPAXry9jfLtumo0LShF+YKVq940R1S2KDdV8S0sT2nKdpKGlLd5sThn8jNVJYEIdQ==";

    // ֧������Կ,�鿴��ַ��https://openhome.alipay.com/platform/keyManage.htm ��ӦAPPID�µ�֧������Կ��
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiPAXyCx1Z5WFsswniy10uZao58rED8SYI+RM0soqVXbTylwU7hqH+BY5vpffLb95E6yja94SLgiAPVK1bfeZiV8AebZkUdc4FjIiJIbtj8OgQVeK0RObAyXfH/by2k/JuRVSxZqqKuFfyTHt8RweaVw8CCDs/Fr0tZjmfQRT7YtR6tTQnXlSolBVRjt8KrfOyLKfdf5ULPdbXaTuKQqreyRlvZO+2URUXKGPzzKBsJTsq3umRmS+SaYf5+xqsDQ+HfWiEEOBUeHe1IS3PM7RE7VyMsMi6L8TP+tIR+WfuP2QAHiCi4iCnaJnRoRXaPogvOAAxia8vu0UAiKQ0yn5qQIDAQAB";

	// �������첽֪ͨҳ��·��  ��http://��ʽ������·�������ܼ�?id=123�����Զ����������������������������
	public static String notify_url = "http://localhost:80/catalog/view";

	// ҳ����תͬ��֪ͨҳ��·�� ��http://��ʽ������·�������ܼ�?id=123�����Զ����������������������������
	public static String return_url = "http://localhost:80/catalog/view";

	// ǩ����ʽ
	public static String sign_type = "RSA2";
	
	// �ַ������ʽ
	public static String charset = "utf-8";
	
	// ֧��������
	public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
	
	// ֧��������
	public static String log_path = "C:\\";


//�����������������������������������Ļ�����Ϣ������������������������������

    /** 
     * д��־��������ԣ�����վ����Ҳ���ԸĳɰѼ�¼�������ݿ⣩
     * @param sWord Ҫд����־����ı�����
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}

